/*
 * IWeatherManager
 *
 * Copyright 2008-2011 Centro Andaluz de Innovacion y Tecnologias de la
 * Informacion y las Comunicaciones (CITIC). All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Please contact CITIC - Edificio CITIC, C/ Marie Curie, 6 Parque
 * Tecnologico de Andalucia 29590 - Campanillas, Malaga, Spain
 * or visit www.citic.es, if you need additional information or
 * have any questions.
 */

package es.citic.puedes.weatherservice;

import java.util.List;

import es.citic.puedes.weatherservice.model.Language;
import es.citic.puedes.weatherservice.model.Location;
import es.citic.puedes.weatherservice.model.WeatherCondition;
import es.citic.puedes.weatherservice.umm.WeatherPreferences;

public interface IWeatherManager {

	/**
	 * Get a list of locations given a name
	 * 
	 * @param location
	 *            Location name to search
	 * @return list of locations
	 * @throws WeatherException
	 *             If an exception occurred
	 */
	public List<Location> getLocation(String location) throws WeatherException,
			SecurityException;

	/**
	 * Get a weather prediction given a location and a country
	 * 
	 * @param name
	 *            Location name
	 * @param country
	 *            Country name
	 * @param days
	 *            Number of days to get prediction
	 * @param language
	 *            Language for getting the preference date in the correct format
	 * @param user
	 *            User's identifier          
	 * @throws WeatherException
	 *             If an exception occurred
	 */
	public WeatherCondition getWeather(String cityName, String country,
			int days, Language language, Integer user) throws WeatherException,
			SecurityException;

	/**
	 * Get the user's preferences
	 * 
	 * @param user
	 *            User's identifier
	 * @param language
	 *            Language for getting the preference date in the correct format
	 * @return preferenceList List with user's preferences
	 * @throws WeatherException
	 *             If an exception occurred
	 */
	public List<WeatherPreferences> getPreferences(Integer user,
			Language language) throws WeatherException, SecurityException;
}
